package com.lzx.adx.report.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.lzs.adx.commmon.service.impl.CrudServiceImpl;
import com.lzx.adx.report.dao.ResultTypeDao;
import com.lzx.adx.report.dto.ResultTypeDTO;
import com.lzx.adx.report.entity.ResultTypeEntity;
import com.lzx.adx.report.service.ResultTypeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 *
 * @author wangzhijun 825400558@qq.com
 * @since 1.0.0 2024-08-21
 */
@Service
public class ResultTypeServiceImpl extends CrudServiceImpl<ResultTypeDao, ResultTypeEntity, ResultTypeDTO> implements ResultTypeService {



    @Override
    public QueryWrapper<ResultTypeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");
        String productChannle = (String)params.get("productChannle");
        String resultType = (String)params.get("resultType");

        QueryWrapper<ResultTypeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);
        wrapper.eq(StringUtils.isNotBlank(productChannle), "product_channle", productChannle);
        wrapper.eq(StringUtils.isNotBlank(resultType), "result_type", resultType);

        return wrapper;
    }



}